<!--
  @author heguanghua
  @since 2019/06/13 13:58
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead >
        <tr>
            <!--规定复选框列置于第1列，居中显示-->
            <th lay-data="{type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>
            <th lay-data="{field:'relateId', width:10, unresize:true, align:'center', hide:true}">relateId</th>
            <!--规定“排序”列置于第2列，居中显示-->
            <th lay-data="{field:'companyName', width:200, unresize:true, align:'center'}">公司名称</th>
            <!--规定“ID”列置于第3列，居中显示-->
            <th lay-data="{field:'accountId', unresize:true, align:'center'}">账户ID</th>
            <th lay-data="{field:'accountName', unresize:true, align:'center'}">账户名称</th>
            <th lay-data="{field:'secretKey', width:100, unresize:true, align:'center'}">密钥</th>
            <th lay-data="{field:'token', width:100, unresize:true, align:'center'}">token</th>
            <th lay-data="{field:'landingPageLink', width:200, unresize:true, align:'center'}">落地页链接</th>
            <!--规定“状态”列靠后放置，居中显示-->
            <th lay-data="{field:'status', width:80, unresize:true, align:'center'}">状态</th>
            <!--规定操作列置于最后-->
            <th lay-data="{field:'操作', unresize:true, width:80, align:'center', fixed:'right'}">操作</th>
            <!--其他规范
                值较大的数字列居右显示，并使用千分号；值较小的数字列可居中显示，
                金额列统一居右显示，默认精确到小数点后2位，并使用千分号，
                通常情况下，时间或日期列靠后放置(操作列前)，居中显示
                -->
        </tr>
    </thead>
    <tbody>
        <tr th:each="item:${items}">
            <td ></td>
            <td th:text="${item.relateId}">relateId</td>
            <td th:text="${item.companyName}">companyName</td>
            <td th:text="${item.accountId}">accountId</td>
            <td th:text="${item.accountName}">accountName</td>
            <td>
                <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/promotion/secretKey.action'))},'您暂时无权限查看该信息',this)|">
                    <div th:class="${item.relateId + '_secretKey'}"></div>
                    <a th:class="${item.relateId + '_secretKey'}" style="color: #00a0e9" href="#" th:onclick="displayHiddenData([[${item.relateId}]], 'secretKey', [[${#authPermit.checkPermit('/channel/promotion/secretKey.action')}]])">查看</a>
                </div>
            </td>
            <td>
                <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/promotion/token.action'))},'您暂时无权限查看该信息',this)|">
                    <div th:class="${item.relateId + '_token'}"></div>
                    <a th:class="${item.relateId + '_token'}" style="color: #00a0e9" href="#" th:onclick="displayHiddenData([[${item.relateId}]], 'token', [[${#authPermit.checkPermit('/channel/promotion/token.action')}]])">查看</a>
                </div>
            </td>
            <td th:text="${item.landingPageLink}">landingPageLink</td>
            <td th:text="${item.status==2?'正常':'停用'}">status</td>
            <td>
                <a th:if="${#authPermit.checkPermit('/channel/promotion/detail.action')}" style="color: #00a0e9" th:lay-href="|/channel/promotion/detail?channelId=${item.channelId}&relateId=${item.relateId}|">详情</a>
            </td>
        </tr>
    </tbody>
</table>
